Merge "RevisionStore: Properly encode timestamp"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Sun, 18 Mar 2018 05:06:21 +0000 (05:06 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Sun, 18 Mar 2018 05:06:21 +0000 (05:06 +0000)
includes/Storage/RevisionStore.php

index 98ad287..2e3103c 100644 (file)
@@ -1044,9 +1044,10 @@ class RevisionStore
         * @return RevisionRecord|null
         */
        public function getRevisionByTimestamp( $title, $timestamp ) {
+               $db = $this->getDBConnection( DB_REPLICA );
                return $this->newRevisionFromConds(
                        [
-                               'rev_timestamp' => $timestamp,
+                               'rev_timestamp' => $db->timestamp( $timestamp ),
                                'page_namespace' => $title->getNamespace(),
                                'page_title' => $title->getDBkey()
                        ],